
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
       
    </style>
    <script src="./dist/vue.js"></script>
</head>
<body>
    <div id="root"></div>
    
</body>
<script>
  
  const app = Vue.createApp({
    created(){
      
    },
      data(){
          return {
           
          }
      },
     
      methods:{
        
      },
      template:
      ` 
      <demo :level='1'>
        hello demo水水水水
        </demo>
      
      `
  });

  app.component('demo', {
    props:['level'],  
    render(){
      const { h } = Vue
      console.log(this.$slots.default())
      // return h('h'+this.level, {class: 'aaa'}, this.$slots.default())
      return h('h'+this.level, {class: 'aaa'}, [
      this.$slots.default(),
      h('span', {}, 'guoguo')
      ])
    },
    // template:
    //     `
    //     <h2>
    //       <slot/>
    //       </h2>

    //      `
  });

  app.config.optionMergeStrategies.stuName = (mixValue, appValue, vm) => {
    return mixValue || appValue 
  }
    const vm = app.mount("#root");
</script>
</html>